﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// 使用OleDb连接sql server数据库
using System.Data.OleDb;


namespace 实验7_学生成绩管理系统
{
    class OleDbUtil
    {
        public static OleDbCommand getOleDbCommand()
        {
            string conStr = "Provider=SQLOLEDB;Data Source=.;Integrated Security=SSPI;Initial Catalog=master";
            OleDbConnection conn = new OleDbConnection();
            conn.ConnectionString = conStr;
            conn.Open();
            OleDbCommand cmd = new OleDbCommand();
            cmd.Connection = conn;
            return cmd;
        }
    }
}
